#include "tcp_server.hpp"  // 提供网络连接功能
#include "handler.hpp" // 提供网络处理功能
void Usage(std::string proc) {
    std::cout << "Usage: " << "\n\t" << proc << " port" << std::endl;
}

int main(int argc, char *argv[]) {
    if (argc != 2) {
        Usage(argv[0]);
        return 1;
    }
    uint16_t port = atoi(argv[1]);
    ns_tcpserver::TcpServer *svr = new ns_tcpserver::TcpServer(port);
    svr->InitTcpServer();
    svr->Loop(ns_handler::HandlerSock_v4);
    return 0;
}
